//ServletInit.java
package com.ylaihui.servlet;

import javax.servlet.*;
import java.io.IOException;

public class ServletInit implements Servlet {
    public ServletInit() {
        System.out.println("1. Servlet Constructor...");
    }

    @Override
    public void init(ServletConfig servletConfig) throws ServletException {
        System.out.println("2. Servlet init...");
    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }

    @Override
    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
        System.out.println("3. Servlet servict method...");
    }

    @Override
    public String getServletInfo() {
        return null;
    }

    @Override
    public void destroy() {
        System.out.println("4. Servlet destory...");
    }
}
